<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>积分兑换记录信息管理-后台管理系统</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/admin/css/css.css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/admin/js/jquery.min.js"></script>
<!-- <script type="text/javascript" src="js/page.js" ></script> -->
</head>

<body>
	<div id="pageAll">
		<div class="pageTop">
			<div class="page">
				<img src="${pageContext.request.contextPath}/admin/img/coin02.png" /><span><a href="#">首页</a>&nbsp;-&nbsp;-</span>&nbsp;积分兑换记录查删
			</div>
		</div>

		<div class="page">
			<!-- user页面样式 -->
			<div class="connoisseur">
				<!-- user 表格 显示 -->
				<div class="conShow">
					<table border="1" cellspacing="0" cellpadding="0">
						<tr>
							<td width="66px" class="tdColor tdC">序号</td>
							<td width="560px" class="tdColor">用户id</td>
							<td width="435px" class="tdColor">兑换所需积分</td>
							<td width="400px" class="tdColor">兑换商品名</td>
							<td width="530px" class="tdColor">兑换商品时间</td>
							<td width="700px" class="tdColor">兑换商品状态（能/不能）</td>
							<td width="660px" class="tdColor">送货地址</td>
							<td width="635px" class="tdColor">送货时间</td>
							<td width="130px" class="tdColor">操作</td>
						</tr>
						<c:forEach var="record" items="${sessionScope.records}">
							<tr>
								<td style="width:265px;">${record.id}</td>
								<td>${record.userId}</td>
								<td>${record.integral}</td>
								<td>${record.exchangeName}</td>
								<td>${record.exchangeTime}</td>
								<td>${record.status}</td>
								<td>${record.deliveryAddress}</td>
								<td>${record.deliveryTime}</td>
								<%--&PR=${record.productNum}&NA=${record.name}&PR=${record.price}&DI=${record.discountPrice}&IM=${record.img}&${record.discount}&${record.status}&${record.type}&${record.fitGrade}&${record.author}&${record.publishHouse}&${record.publishDate}&${record.integral}&${record.uploadTime}--%>
								<td>
									<%--<a href="${pageContext.request.contextPath}/book?method=deleterecord&?id=${record.id}&admin=admin}">--%>
									<img class="operation delban" src="img/delete.png" onclick="dj(${record.id})">
										<%--suppress CheckValidXmlInScriptTagBody --%>
								</td>
							</tr>

						</c:forEach>
					</table>

					<div class="paging">
                        <table>
                            <tr>
								<c:if test="${sessionScope.currentPage5 > 1}">
									<a href="${pageContext.request.contextPath }/record?method=findByPage&pageIndex5=${sessionScope.currentPage5-1}">上一页</a>
								</c:if>
								<c:if test="${sessionScope.currentPage5 <= 1}">
								<a style="background-color:gray;">上一页</a>
								</c:if>

								<c:forEach begin="1" end="${sessionScope.recordPage}" varStatus="v">
									<a href="${pageContext.request.contextPath }/record?method=findByPage&pageIndex5=${v.count}">${v.count} &nbsp;</a>
								</c:forEach>

								<c:if test="${sessionScope.currentPage5 < sessionScope.recordPage }">
									<a href="${pageContext.request.contextPath }/record?method=findByPage&pageIndex5=${sessionScope.currentPage5+1}">下一页</a>
								</c:if>
								<c:if test="${sessionScope.currentPage5 >= sessionScope.recordPage}">
								<a style="background-color:gray;">下一页</a>
								</c:if>
                            </tr>
                        </table>
                    </div>
				</div>
				<!-- user 表格 显示 end-->
			</div>
			<!-- user页面样式end -->
		</div>

	</div>


	<!-- 删除弹出框 -->
	<div class="banDel">
		<div class="delete">
			<div class="close">
				<a><img src="img/shanchu.png" /></a>
			</div>
			<p class="delP1">你确定要删除此条记录吗？</p>
			<p class="delP2">
				<a href="" id="aSub" class="ok yes">确定</a><a class="ok no">取消</a>
			</p>
		</div>
	</div>
<%--suppress CheckValidXmlInScriptTagBody --%>
	<script>
        function dj(id) {
            document.querySelector("#aSub").href = "${pageContext.request.contextPath}/record?method=delete&id="+id;
        }
	</script>
	<!-- 删除弹出框  end-->
</body>

<script type="text/javascript">
// 广告弹出框
$(".delban").click(function(){
  $(".banDel").show();
});
$(".close").click(function(){
  $(".banDel").hide();
});
$(".no").click(function(){
  $(".banDel").hide();
});
// 广告弹出框 end
</script>
</html>